-----------------------------------------------------------
--Archivo: mux.vhd 			                 --
--Fecha de creación: 04/02/2011				 --
--Última fecha de modificación: 06/02/2011		 --
--Diseñador: Typson Sanchez				 --
--Diseño: Multiplexor.				 	 --
--Propósito: Multiplexor de 64 a 1 para el	 	 --
--acceso al modulo de memoria				 --
-----------------------------------------------------------
library ieee; 
use ieee.std_logic_1164.all; 
 

entity mux is

  port (aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl : in std_logic_vector (3 downto 0); 
        s : in std_logic_vector (5 downto 0); 
        o : out std_logic_vector (3 downto 0)); 
end mux; 
 
architecture archi of mux is 
  begin 
    process (aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, s) 
    begin 
      case s is 
	when "000000" => o <= aa; 
	when "000001" => o <= ab;
	when "000010" => o <= ac;
	when "000011" => o <= ad;
	when "000100" => o <= ae;
	when "000101" => o <= af;
	when "000110" => o <= ag;
	when "000111" => o <= ah;
	when "001000" => o <= ai;
	when "001001" => o <= aj;
	when "001010" => o <= ak;
	when "001011" => o <= al;
	when "001100" => o <= am;
	when "001101" => o <= an;
	when "001110" => o <= ao;
	when "001111" => o <= ap;
	when "010000" => o <= aq;
	when "010001" => o <= ar;
	when "010010" => o <= as;
	when "010011" => o <= at;
	when "010100" => o <= au;
	when "010101" => o <= av;
	when "010110" => o <= aw;
	when "010111" => o <= ax;
	when "011000" => o <= ay;
	when "011001" => o <= az;
	when "011010" => o <= ba;
	when "011011" => o <= bb;
	when "011100" => o <= bc;
	when "011101" => o <= bd;
	when "011110" => o <= be;
	when "011111" => o <= bf;
	when "100000" => o <= bg;
	when "100001" => o <= bh;
	when "100010" => o <= bi;
	when "100011" => o <= bj;
	when "100100" => o <= bk;
	when "100101" => o <= bl;
	when "100110" => o <= bm;
	when "100111" => o <= bn;
	when "101000" => o <= bo;
	when "101001" => o <= bp;
	when "101010" => o <= bq;
	when "101011" => o <= br;
	when "101100" => o <= bs;
	when "101101" => o <= bt;
	when "101110" => o <= bu;
	when "101111" => o <= bv;
	when "110001" => o <= bw;
	when "110010" => o <= bx;
	when "110011" => o <= by;
	when "110100" => o <= bz;
	when "110101" => o <= ca;
	when "110110" => o <= cb;
	when "110111" => o <= cc;
	when "110111" => o <= cd;
	when "111000" => o <= ce;
	when "111001" => o <= cf;
	when "111010" => o <= cg;
	when "111011" => o <= ch;
	when "111100" => o <= ci;
	when "111101" => o <= cj;
	when "111110" => o <= ck;
	when others => o <= cl;
      end case; 
  end process; 
end archi; 

